package com.daxia.ogmall.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.daxia.ogmall.model.BaseModel;

import javax.persistence.ManyToOne;
import com.daxia.ogmall.model.Space;
import javax.persistence.JoinColumn;

/**
 * SpaceObject
 */
@Entity
@Table(name = "spaceobject") 
public class SpaceObject extends BaseModel {
	
	public SpaceObject() {
	}
	
	public SpaceObject(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 空间
	 */
	@ManyToOne
	@JoinColumn(name = "space_id")
    private Space space;
	/**
	 * 名称
	 */
	@Column(name = "name")
    private String name;
	
	private String image;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public Space getSpace() {
    	return space;
    }
	
    public void setSpace(Space space) {
    	this.space = space;
    }
	
	public String getName() {
    	return name;
    }
	
    public void setName(String name) {
    	this.name = name;
    }

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
    
}
